﻿<!-- Begin View Wrapper -->
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">
                Welcome to the Ordering Application! <br/>
                <small>Here you can manage inventory and orders for our customers.</small>
            </h1>
        </div>
    </div>
    <div class="row">
        <div class="col-md-8">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3>Pending Orders</h3>
                </div>
                <div class="panel-body">
                    <div class="list-group">
                        @foreach (var order in ViewBag.Orders)
                        {
                            <a href="#" class="list-group-item">
                                <h4 class="list-group-item-heading">
                                    @order.Name
                                    <span last-updated="@order.LastUpdated" class="pull-right">Last Updated: @order.LastUpdated</span>
                                </h4>
                                <p class="list-group-item-text">
                                    @order.Description
                                </p>
                                <div class="progress">
                                    <progressbar stage="@order.Stage"></progressbar>
                                </div>
                            </a>
                        }
                    </div>
                </div>
                <div class="panel-footer">
                    <a class="pull-right btn btn-primary" href="/Messages/ViewMessages">See all</a> <br/>
                    <span class="clearfix"></span>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div id="inventoryWidget">
                @await Component.InvokeAsync("InventoryWidget")
            </div>
            <div id="surveyWidget">
                @await Component.InvokeAsync("SurveyWidget")
            </div>
            @Html.Partial("_IdeaWidget")
        </div>
    </div>
</div>
<!-- End View Wrapper -->